STRING( REGEX REPLACE ".*/(.*)" "\\1" CURRENT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR} )
set(MODULE_NAME ${CURRENT_FOLDER})

# add global include, compile macro and options to public target #
set(MODULE_INCLUDE_PUB)
set(MODULE_CXXINCLUDE_PUB)
set(MODULE_COPTS_PUB)
set(MODULE_ASOPTS_PUB)
set(MODULE_CXXOPTS_PUB)
set(MODULE_CMACRO_PUB)
set(MODULE_ASMACRO_PUB)
set(MODULE_CXXMACRO_PUB)


# add local include, compile macro and options to private target #
set(MODULE_INCLUDE_PRI)
set(MODULE_COPTS_PRI ${LITEOS_NON_SECURE_LOCAL_OPTS})
set(MODULE_ASOPTS_PRI ${LITEOS_NON_SECURE_LOCAL_OPTS})
set(MODULE_CXXOPTS_PRI ${LITEOS_NON_SECURE_LOCAL_OPTS})
set(MODULE_CMACRO_PRI)
set(MODULE_ASMACRO_PRI)
set(MODULE_CXXMACRO_PRI)


# add srcs to private target #
set(LOCAL_SRCS_y)
list(APPEND LOCAL_SRCS_${LOSCFG_ARM_GIC_V2} arm_gic_v2.c)
list(APPEND LOCAL_SRCS_${LOSCFG_ARM_GIC_V3} arm_gic_v3.c)
if(LOSCFG_ARCH_ARM_AARCH64)
    list(APPEND LOCAL_SRCS_${LOSCFG_ARM_GIC_V3} arm_gic_v3_el3.S)
endif()
list(APPEND LOCAL_SRCS_${LOSCFG_CORTEX_M_NVIC} arm_nvic.c)
list(APPEND LOCAL_SRCS_${LOSCFG_RISCV_HIMIDEERV200_PLIC} riscv_himideerv200_plic.c)
list(APPEND LOCAL_SRCS_${LOSCFG_RISCV_LCMP_CLIC} riscv_lcmp_clic.c)
list(APPEND LOCAL_SRCS_${LOSCFG_XEA3_INT_CONTROLLER} xtensa_xea3.c)
list(APPEND LOCAL_SRCS_${LOSCFG_XEA2_INT_CONTROLLER} xtensa_xea2.c)
list(APPEND LOCAL_SRCS_${LOSCFG_ARM_V5_VIC} mono_vic.c)
list(APPEND LOCAL_SRCS_${LOSCFG_LINGLONG_IC} linglong_ic.c)

set(LOCAL_SRCS ${LOCAL_SRCS_y})
include(${MODULE})
